package com.atom.module.lib.opengles.util

import android.opengl.Matrix
import com.atom.module.lib.opengles.ext.makeIdentity

object MatrixUtils {

    public const val SIZE_OF_FLOAT: Int = 4
    public const val SIZE_OF_BYTE: Int = 1
    public const val SIZE_OF_SHORT: Int = 2
    public const val SIZE_OF_INT: Int = 4

    @JvmField
    public val IDENTITY_MATRIX: FloatArray = FloatArray(16).apply {
        makeIdentity()
    }

    @JvmStatic
    fun matrixMultiply(result: FloatArray, left: FloatArray, right: FloatArray) =
        Matrix.multiplyMM(result, 0, left, 0, right, 0)

}